package work;

// 狮子类
public class Lion extends Mammal {
    public String getManeColor() {
        return maneColor;
    }

    public void setManeColor(String maneColor) {
        this.maneColor = maneColor;
    }

    private String maneColor;

    public double getWeight() {
        return weight;
    }

    public void setWeight(double weight) {
        this.weight = weight;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }

    private double weight;
    private int age;
    public Lion(){

    }
    public Lion(String name, String maneColor,int age, int weight) {
        super(name);
        this.age=age;
        this.weight=weight;
        this.maneColor = maneColor;
    }

    public void move(){
        System.out.println("狮子正在奔跑");
    }

    @Override
    public void displayDetails() {
        super.displayDetails();
        System.out.println(name);
        System.out.println("体重：" + weight + "kg");
        System.out.println("年龄：" + age + "岁");
        System.out.println("鬃毛颜色：" + maneColor);
        super.move();
        this.move();
    }

    @Override
    public void makeSound(){
        System.out.println("狮子咆哮");
    }
}

